/*
 * Copyright 2003-2005 (c) Live Media Pty Ltd. <argot@einet.com.au> 
 *
 * This software is licensed under the Argot Public License 
 * which may be found in the file LICENSE distributed 
 * with this software.
 *
 * More information about this license can be found at
 * http://www.einet.com.au/License
 * 
 * The Developer of this software is Live Media Pty Ltd,
 * PO Box 4591, Melbourne 3001, Australia.  The license is subject 
 * to the law of Victoria, Australia, and subject to exclusive 
 * jurisdiction of the Victorian courts.
 */

using System;

using DictionaryMap = argot.dictionary.DictionaryMap;

namespace argot
{
	
	/// <summary> 
	/// Singleton to allow applications to retrieve a central
	/// TypeLibrary across a whole application.
	/// </summary>
	public class TypeLibrarySingleton
	{
		public static TypeLibrary Default
		{
			get
			{
				if (_typeLibrary == null)
				{
					_typeLibrary = new TypeLibrary();
					TypeMapCore.LoadLibrary(_typeLibrary);
					DictionaryMap.LoadDictionaryMap(_typeLibrary);
					TypeBindCommon.BindCommon(_typeLibrary);
				}
				return _typeLibrary;
			}
			
		}
		
		private static TypeLibrary _typeLibrary;
	}
}